const mongoose = require('mongoose');

function dbConnect(url) {
    mongoose.connect(url);
    mongoose.connection.once('open', function (err) {
        if (!err) {
            console.log('mongodb is connected...');
        } else {
            console.log('connect error!');
        }
    })
}

exports.dbConnect = dbConnect;